package com.xin.minibusmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xin.common.utils.PageUtils;
import com.xin.minibusmall.product.entity.CategoryEntity;
import com.xin.minibusmall.product.vo.Catelog2Vo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author fbb
 * @email 1339279838@qq.com
 * @date 2020-08-23 17:35:28
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    Long[] findCatelogPath(Long catelogId);

    List<Long> findParentDfs(Long catelogId, List<Long> path);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catelog2Vo>> getCatalogJson();

    Map<String, List<Catelog2Vo>> getCatalogJsonFromDBWithLocalLock();

    Map<String, List<Catelog2Vo>> getCatalogJsonFromDBWithRedissonLock();

    Map<String, List<Catelog2Vo>> getCatalogJsonFromDB();
}

